import http from '@/common/http.js'

module.exports = {
	// 获取用户信息
	login: function (param) {
		return http.post('/user/login', param);
	},
	// 获取用户手机号
	getPhoneNumber: function (param) {
		return http.post('/user/getPhoneNumber', param)
	},
	// 发布宠物领养
	addPetAdopt: function (param) {
		return http.post('/adopt/add', param)
	},
	// 查询宠物领养列表
	queryPetAdopts: function (param) {
		return http.post('/adopt/queryList', param)
	},
	// 上传图片
	uploadFile: function (param) {
		return http.uploadFile('/file/uploadPic', param)
	},
	// 删除图片
	deletePic: function (param) {
		return http.get('/file/deletePic', param)
	},
	// 查询宠物领养信息
	getPetAdopt: function (param) {
		return http.get("/adopt/getById", param)
	},
	// 发布寻宠信息
	addPetFind: function (param) {
		return http.post('/petFind/add', param)
	},
	// 查询寻宠列表
	queryPetFinds: function (param) {
		return http.post('/petFind/queryList', param)
	},
	// 查询寻宠信息
	getPetFind: function (param) {
		return http.get("/petFind/getById", param)
	},
	// 新增宠物圈
	addPetCircle: function (param) {
		return http.post('/petCircle/add', param)
	},
	// 查询宠物圈列表
	queryPetCircles: function (param) {
		return http.post('/petCircle/queryList', param)
	},
	// 查询宠物圈
	getPetcircle: function (param) {
		return http.get('/petCircle/getById', param)
	},
	// 查询宠物科普列表
	queryPetCyclopedias: function (param) {
		return http.post('/petCyclopedia/queryList', param)
	},
	// 查询宠物科普
	getPetCyclopedia: function (param) {
		return http.get('/petCyclopedia/getById', param)
	},
	// 查询积分
	getCredits: function (param) {
		return http.get('/credits/getCredits', param)
	},
	// 更新积分/签到天数
	updateCredits: function (param) {
		return http.get('/credits/updateCredits', param)
	},
	// 查询用户信息
	getUserInfo: function (param) {
		return http.get('/user/getUserInfo', param)
	},
	// 查询领养/寻宠总数
	queryPetCount: function (param) {
		return http.get('/adopt/queryCount', param)
	},
	// 新增评论
	addComment: function (param) {
		return http.post('/comment/addComment', param)
	},
	// 查询评论列表 By FromId
	queryComments: function (param) {
		return http.get('/comment/queryComments', param)
	},
	// 查询评论总数 By FromId
	queryCommentCount: function (param) {
		return http.get('/comment/queryCount', param)
	},
	// 点赞
	addLove: function (param) {
		return http.get('/comment/addLove', param)
	},
	// 取消点赞
	cutLove: function (param) {
		return http.get('/comment/cutLove', param)
	},
	// 删除评论
	deleteComment: function (param) {
		return http.get('/comment/deleteComment', param)
	},
	// 查询文章列表
	queryArticles: function (param) {
		return http.post('/article/queryArticles', param)
	},
	// 新增聊天消息
	addChat: function (param) {
		return http.post('/chat/add', param)
	},
	// 查询消息数量
	queryChatCount: function (param) {
		return http.get('/chat/queryCount', param)
	},
	// 查询聊天内容
	queryChatContent: function (param) {
		return http.get('/chat/queryChatContent', param)
	},
	// 查询未读消息总数
	queryUnreadTotal: function (param) {
		return http.get('/chat/queryUnreadTotal', param)
	},
	// 添加用户关注
	addUserFollow: function (param) {
		return http.post('/userFollow/addUserFollow', param)
	},
	// 取消关注
	unUserFollow: function (param) {
		return http.post('/userFollow/unUserFollow', param)
	},
	// 查询是否关注
	isFollow: function (param) {
		return http.get('/userFollow/isFollow', param)
	},
	// 查询用户关注列表
	queryUserFollows: function (param) {
		return http.get('/userFollow/queryUserFollows', param)
	},
	// 查询用户的粉丝列表
	queryUserFans: function (param) {
		return http.get('/userFollow/queryUserFans', param)
	},
	// 手机号登录
	phoneLogin: function (param) {
		return http.get('/user/phoneLogin', param)
	},
	// getFlag
	getFlag: function () {
		return http.get('/index/getFlag')
	},
	// 查询题目
	getAnswer: function (param) {
		return http.get('/answer/getAnswerPrize', param)
	},
	// 用户答题 添加记录
	addAnswerRecord: function (param) {
		return http.post('/answer/addAnswerRecord', param)
	},
	// 今日是否已答题
	isFinishToday: function (param) {
		return http.get('/answer/isFinishToday', param)
	},
	// 查询答题记录
	queryAnswerRecords: function (param) {
		return http.post('/answer/queryAnswerRecords', param)
	},
	// 添加收藏
	addCollect: function (param) {
		return http.post('/collect/addCollect', param)
	},
	// 取消收藏
	removeCollect: function (param) {
		return http.post('/collect/removeCollect', param)
	},
	// 是否收藏
	isCollect: function (param) {
		return http.post('/collect/isCollect', param)
	},
	// 查询收藏
	queryCollect: function (param) {
		return http.post('/collect/queryCollect', param)
	},
	// 添加申请领养
	addApplyAdopt: function (param) {
		return http.post('/adopt/add/applyAdopt', param)
	},
	// 查询我申请的列表
	queryMyApplyList: function (param) {
		return http.get('/adopt/queryMyApplyList', param)
	},
	// 查询我收到的申请列表
	queryReceiveApplyList: function (param) {
		return http.get('/adopt/queryReceiveApplyList', param)
	},
	// 领养申请详情
	getApplyById: function (param) {
		return http.get('/adopt/getApplyById', param)
	},
	// 领养申请审核
	applyAudit: function (param) {
		return http.get('/adopt/audit', param)
	},
	// 查询领养申请未处理消息总数
	applyCount: function (param) {
		return http.get('/adopt/applyCount', param)
	},
	// 提交举报
	addComplaint: function (param) {
		return http.post('/complaint/add', param)
	},
	// 黑名单列表
	quertComplaints: function (param) {
		return http.get('/complaint/queryList', param)
	},
	// 更新用户信息
	updateUser: function (param) {
		return http.post('/user/updateUser', param)
	},
	// 添加宠物
	addPet: function (data) {
		return http.post(`/pets/add?openId=${data.openId}`, data)
	},
	// 查询用户宠物列表
	queryUserPets: function (param) {
		return http.post(`/pets/queryList?openId=${param.openId}`, param)
	},
	// 查询宠物信息 id
	getPetById: function (param) {
		return http.get(`/pets/getById?openId=${param.openId}`, param)
	},
	// 删除宠物
	deletePet: function (param) {
		return http.get(`/pets/deleteById?openId=${param.openId}`, param)
	},
	// 更新宠物
	editPetById:function(param) {
		return http.post(`/pets/updateById?id=${param.id}`, param)
	},
	// 查询饲养记录列表
	queryFeedingLogs: function (param) {
		return http.post('/petfeedinglogs/queryList', param)
	},
	// 新增饲养记录
	addFeedingLog: function (id, param) {
		return http.post(`/petfeedinglogs/add?petId=${id}`, param)
	},
	// 查询饲养记录
	getFeedingLogById: function (param) {
		return http.get('/petfeedinglogs/getById', param)
	},
	// 删除饲养记录
	deleteFeedingLog: function (param) {
		return http.get('/petfeedinglogs/deleteById', param)
	},
	// 查询活动记录
	queryPetEvent: function (id) {
		// console.log('数据请求');
		return http.post(`/petevent/queryList?petId=${id}`);
	},
	// 添加活动记录
	addPetEvent: function (id, plan) {
		// console.log(plan);
		return http.post(`/petevent/add??petId=${id}`, plan)
	},
	// 查询活动详情
	getPetEventDetail: function (id) {
		return http.get(`/petevent/getById?id=${id}`)
	},
	// 删除活动
	deletePetEvent: function (id) {
		return http.get(`/petevent/deleteById?id=${id}`)
	},
	// 修改活动信息
	updatePetEvent: function (id, param) {
		return http.post(`/petevent/updateById?id=${id}`, param)
	}


}


